package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.approval.dto.IssuedApproFlowAddDTO;
import org.jsola.contract.dto.IssuedCategoryAddDTO;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import java.util.List;

import static org.jsola.hr.example.CompanyExample.E_ADDRESS;
import static org.jsola.hr.example.CompanyExample.E_ADMINISTRATOR_USER_IDS;
import static org.jsola.hr.example.CompanyExample.E_BUSINESS_SCOPE;
import static org.jsola.hr.example.CompanyExample.E_CLIENT_LEVEL;
import static org.jsola.hr.example.CompanyExample.E_CLIENT_PHONE;
import static org.jsola.hr.example.CompanyExample.E_EMAIL;
import static org.jsola.hr.example.CompanyExample.E_INDUSTRY;
import static org.jsola.hr.example.CompanyExample.E_LEGAL_PERSON;
import static org.jsola.hr.example.CompanyExample.E_LOGO;
import static org.jsola.hr.example.CompanyExample.E_NAME;
import static org.jsola.hr.example.CompanyExample.E_OFFICIAL_WEBSITE;
import static org.jsola.hr.example.CompanyExample.E_PERSON_SIZE;
import static org.jsola.hr.example.CompanyExample.E_PROFILE;
import static org.jsola.hr.example.CompanyExample.E_SERVER_ANNEX;
import static org.jsola.hr.example.CompanyExample.E_TELEPHONE;
import static org.jsola.hr.example.CompanyExample.M_ADDRESS_MAX;
import static org.jsola.hr.example.CompanyExample.M_ADMINISTRATOR_USER_IDS_MAX;
import static org.jsola.hr.example.CompanyExample.M_BUSINESS_SCOPE_MAX;
import static org.jsola.hr.example.CompanyExample.M_CLIENT_LEVEL_MAX;
import static org.jsola.hr.example.CompanyExample.M_CLIENT_PHONE_MAX;
import static org.jsola.hr.example.CompanyExample.M_EMAIL_MAX;
import static org.jsola.hr.example.CompanyExample.M_INDUSTRY_MAX;
import static org.jsola.hr.example.CompanyExample.M_LEGAL_PERSON_MAX;
import static org.jsola.hr.example.CompanyExample.M_LOGO_MAX;
import static org.jsola.hr.example.CompanyExample.M_NAME_MAX;
import static org.jsola.hr.example.CompanyExample.M_NAME_NOT_NULL;
import static org.jsola.hr.example.CompanyExample.M_OFFICIAL_WEBSITE_MAX;
import static org.jsola.hr.example.CompanyExample.M_PERSON_SIZE_MAX;
import static org.jsola.hr.example.CompanyExample.M_PROFILE_MAX;
import static org.jsola.hr.example.CompanyExample.M_SERVER_ANNEX_MAX;
import static org.jsola.hr.example.CompanyExample.M_TELEPHONE_MAX;
import static org.jsola.hr.example.CompanyExample.N_ADDRESS;
import static org.jsola.hr.example.CompanyExample.N_ADMINISTRATOR_USER_IDS;
import static org.jsola.hr.example.CompanyExample.N_BUSINESS_SCOPE;
import static org.jsola.hr.example.CompanyExample.N_CLIENT_LEVEL;
import static org.jsola.hr.example.CompanyExample.N_CLIENT_PHONE;
import static org.jsola.hr.example.CompanyExample.N_EMAIL;
import static org.jsola.hr.example.CompanyExample.N_INDUSTRY;
import static org.jsola.hr.example.CompanyExample.N_LEGAL_PERSON;
import static org.jsola.hr.example.CompanyExample.N_LOGO;
import static org.jsola.hr.example.CompanyExample.N_NAME;
import static org.jsola.hr.example.CompanyExample.N_OFFICIAL_WEBSITE;
import static org.jsola.hr.example.CompanyExample.N_PERSON_SIZE;
import static org.jsola.hr.example.CompanyExample.N_PROFILE;
import static org.jsola.hr.example.CompanyExample.N_SERVER_ANNEX;
import static org.jsola.hr.example.CompanyExample.N_TELEPHONE;

/**
 * 用工单位
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【用工单位】的参数")
@Data
public class CompanyAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 100, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_INDUSTRY, example = E_INDUSTRY)
    @Length(max = 100, message = M_INDUSTRY_MAX)
    private String industry;

    @ApiModelProperty(notes = N_ADMINISTRATOR_USER_IDS, example = E_ADMINISTRATOR_USER_IDS)
    @Length(max = 2147483647, message = M_ADMINISTRATOR_USER_IDS_MAX)
    private String administratorUserIds;

    @ApiModelProperty(notes = N_LOGO, example = E_LOGO)
    @Length(max = 100, message = M_LOGO_MAX)
    private String logo;

    @ApiModelProperty(notes = N_BUSINESS_SCOPE, example = E_BUSINESS_SCOPE)
    @Length(max = 500, message = M_BUSINESS_SCOPE_MAX)
    private String businessScope;

    @ApiModelProperty(notes = N_PROFILE, example = E_PROFILE)
    @Length(max = 500, message = M_PROFILE_MAX)
    private String profile;

    @ApiModelProperty(notes = N_LEGAL_PERSON, example = E_LEGAL_PERSON)
    @Length(max = 20, message = M_LEGAL_PERSON_MAX)
    private String legalPerson;

    @ApiModelProperty(notes = N_ADDRESS, example = E_ADDRESS)
    @Length(max = 100, message = M_ADDRESS_MAX)
    private String address;

    @ApiModelProperty(notes = N_PERSON_SIZE, example = E_PERSON_SIZE)
    @Length(max = 50, message = M_PERSON_SIZE_MAX)
    private String personSize;

    @ApiModelProperty(notes = N_CLIENT_LEVEL, example = E_CLIENT_LEVEL)
    @Length(max = 64, message = M_CLIENT_LEVEL_MAX)
    private String clientLevel;

    @ApiModelProperty(notes = N_CLIENT_PHONE, example = E_CLIENT_PHONE)
    @Length(max = 64, message = M_CLIENT_PHONE_MAX)
    private String clientPhone;

    @ApiModelProperty(notes = N_OFFICIAL_WEBSITE, example = E_OFFICIAL_WEBSITE)
    @Length(max = 100, message = M_OFFICIAL_WEBSITE_MAX)
    private String officialWebsite;

    @ApiModelProperty(notes = N_TELEPHONE, example = E_TELEPHONE)
    @Length(max = 50, message = M_TELEPHONE_MAX)
    private String telephone;

    @ApiModelProperty(notes = N_EMAIL, example = E_EMAIL)
    @Length(max = 50, message = M_EMAIL_MAX)
    private String email;

    @ApiModelProperty(notes = N_SERVER_ANNEX, example = E_SERVER_ANNEX)
    private String serverAnnex;

    @ApiModelProperty(notes = "工价/劳务费规则组Ids")
    private List<String> salaryCalculateRuleGroupIdList;

    @ApiModelProperty(notes = "合同模版列表")
    private List<IssuedCategoryAddDTO.Category> categoryList;

    @ApiModelProperty(notes = "是否同步下发印章")
    private Boolean isSeal;

    @ApiModelProperty(notes = "月工资模板Ids")
    private List<Long> salaryTemplateIds;

    @ApiModelProperty(notes = "审批模板列表")
    private List<IssuedApproFlowAddDTO.ApproFlowInfor> approFlowInforList;

    @ApiModelProperty(notes = "入职模板列表")
    private List<String> templateIds;

    @ApiModelProperty(notes = "参保方案Ids")
    private List<String> socProgsIds;

    @ApiModelProperty(notes = "印章设置Ids")
    private List<Long> sealsIds;

    @ApiModelProperty(notes = "用工单位分组Ids")
    private List<String> groupIds;

    @ApiModelProperty(notes = "返费规则Id")
    private String saleRulesId;

    @ApiModelProperty(notes = "销售列表")
    private List<CompanySaleUserAddDTO> saleUserList;

    @ApiModelProperty(notes = "销售-合同信息")
    private List<CompanySaleServerAddDTO> companySaleServerList;

    @ApiModelProperty(notes = "所属分组", example = "福州区域/测试分组")
    private String groupName;

}

